package cn.xtits.xtf.common.db;

import org.apache.commons.dbutils.RowProcessor;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * Created by ShengHaiJiang on 2016/4/6.
 */
public class XTRowProcessor implements RowProcessor {
    private final BeanConverter convert = new BeanConverter();

    public Object[] toArray(ResultSet rs) throws SQLException {
       return null;
    }

    public <T> T toBean(ResultSet rs, Class<T> type) throws SQLException {
        return this.convert.toBean(rs, type);
    }

    public <T> List<T> toBeanList(ResultSet rs, Class<T> type) throws SQLException {
        return this.convert.toBeanList(rs, type);
    }

    public Map<String, Object> toMap(ResultSet rs) throws SQLException {
        return null;
    }
}
